Technical Field
The present disclosure generally relates to a scheduler in an embedded system and, more particularly, but not exclusively, relates to a safety mechanism to detect system faults within a short and definite time.
Description of the Related Art
Many machines include embedded microprocessors. The embedded microprocessors control sensors, actuators, interfaces, communications peripherals, and many other devices. For example, embedded microprocessors are found in industrial machines, building HVAC systems, motor vehicles, public utility meters, automated tollbooths, public water supply testing and filtration systems, and many other types of apparatus.
The embedded processors found in machines typically direct functional device modules of the machine to perform one or more actions. The actions may be electronic actions, software actions, algorithmic actions, mechanical actions or some other type of action. In many cases, the actions directed by the embedded processor are repetitive and predictable. Accordingly, the embedded processor may be configured to direct the actions via a finite state machine (FSM), a task loop, a task scheduler, a multitasking operating system, or via some other configuration.
In some cases, one or more parts of the machine will fail. When a failure occurs, sooner or later, the failure will become known. Some embedded systems are designed with error detection mechanisms, which may alert an operator to the failure or take actions in the machine to reduce the negative impact of the failure. For example, antilock braking systems in automobiles often have brake pad wear-sensors to alert a driver to brake pads that are thinning or otherwise wearing out or beginning to fail. Upon detection of a worn brake pad, the embedded system that controls the antilock braking system may illuminate a dashboard light, sound an audio alarm, or take some other action such as changing the way in which the antilock braking system operates the braking mechanism.
FIG. 1 is a block diagram representation of a conventional motor driven electric power steering (EPS) drive system 10. In such a system, certain sensors are mounted so that the position of the steering column relative to a known reference point can be detected. Other sensors are mounted so that the torque applied to the steering column can be detected. An embedded processor acts on the position and torque signals to produce pulse width modulation signals that drive one or more electric motors coupled to the steering mechanism of the automobile. In FIG. 1, two motors 12x, 12y are shown.
In the conventional motor driven EPS drive system 10, varying amounts of motor drive torque can be applied to the steering mechanism wherein the variation conforms to a particular pattern, curve, or other profile. For example, when a vehicle is moving slowly, the electric motor(s) may apply more torque to the steering mechanism in order to make low speed steering easier. When the vehicle is moving more quickly, the electric motor(s) may apply less torque to the steering mechanism. In this way, the motor driven EPS drive system 10 can be designed with any number of particular profiles to desirably match a selected set of driving conditions.
In the conventional motor driven EPS drive system 10 of FIG. 1, a first channel X is associated with the driver side steering mechanism of the left wheel of an automobile. A second channel Y is associated with the passenger side steering mechanism of the right wheel.
The conventional motor driven EPS drive system 10 includes two motors 12x, 12y, which are coupled to the steering mechanism of the automobile (not shown). The first motor 12x drives the steering mechanism of the left wheel, and the second motor 12y drives the steering mechanism of the right wheel. The operation of each motor 12x, 12y is driven by a respective pulse width modulation (PWM) drive circuit 14x, 14y. 
One or more electronic or electromechanical sensors are utilized in the conventional motor driven EPS drive system 10 of FIG. 1. In the figure, the sensors are illustrated as respective encoders 16x, 16y coupled respectively to a motor 12x, 12y, a control module 18x, 18y, and an analog to digital control (ADC) module 22x, 22y. A scheduler 20 directs the operations of the conventional motor driven EPS drive system 10 components. Generally speaking, sensor inputs are provided to the ADC modules 22x, 22y. At the direction of scheduler 20, the control modules 18x, 18y process input signals from the various sensors (i.e., encoders 16x, 16y, ADC 22x, 22y, and the like), and produce output signals to the PWM modules 14x, 14y. Each PWM module 14x, 14y produces an output signal that is applied to its respective motor 12x, 12y, and the motors apply torque to the steering mechanism.
The motors 12x, 12y of FIG. 1 may be brushless permanent magnet (BPM) motors, alternating current induction motors (ACIM), permanent magnet synchronous motors (PMSM), or some other type of brush or brushless motor. One common example of a motor used in a conventional EPS drive system is an AC multiphase, multi-pole motor such as a three-phase motor with two-pole magnets.
To produce torque, most brush motors take advantage of the electromagnetic interaction between a stator field and a rotor flux. The amount of torque produced by the motor is a function of the alignment between these two domains, and the alignment is controlled by the current passed into the motor. Basically, when the stator field and the rotor flux are in alignment at 0°, the motor is in balance and inclined to stay in balance. When the two domains are in opposed alignment at 180°, the motor is in a cautious balance that is easily disrupted. Between 0° and 180°, the motor is not in balance and inclined to return to balance. The alignment between the stator field and rotor flux is adjusted by controlling the amount of current passed into the motor's armature, and the current is controlled with a simple, repetitive five step procedure: 1) Measure the current flowing in the motor, 2) Compare the current to a reference value, 3) Generate a difference signal, 4) Amplify the difference signal to create a correction signal, and 5) Apply the correction signal to the motor.
An AC brushless motor is structurally different from a DC brush motor. First, in the brushless motor, the positions of the permanent magnets and the electromagnets are swapped. Second, the brushless motor does not have a commutator, so the alignment between the rotor flux and stator field must be recognized and intelligently controlled with, for example, a control algorithm.
In spite of the structural differences, the control process to produce torque in a brushless motor bears similarities to that of the brush motor. In the brushless motor, the control process will regulate stator currents (rather than regulating rotor currents as in the brush motor). Also in the brushless motor, particular vector calculations and transformations of a reference frame are made to control the alignment between the multiple rotor flux and stator fields.
The current flowing through each stator winding of the AC brushless motor creates a magnetic field oriented along its axis at a specific angle. For example, in a three-phase motor, the windings are spatially configured such that the magnetic axis for each phase is spatially separated from each other phase by 120°. The magnetic fields, which are a function of the current in each winding, can be vectorally added together to create a net stator magnetic vector of a certain magnitude and angle. The operation of the motor can be controlled by controlling the currents in each phase (i.e., the currents in each winding).
In a first step of a procedure to control current in the brushless motor, the currents flowing in each phase (i.e., stator) winding of the motor are determined; typically with a combination of measurement and algebraic calculation. The current in a winding can be determined by measuring the DC bus current at a chosen interval during the PWM cycle, and the measurement can be used to reconstruct a current waveform for the phase.
In a second and third combined step, the reconstructed phase current is compared to a reference value. Different from the DC motor, however, the multiple phases of the AC motor are accounted for. That is, since there is no commutator on the AC motor, the alignment of each phase is determined, and the contribution component of each stator current that is producing a magnetic field orthogonal to the rotor flux at a particular instant in time is determined. The determined current components are then regulated in the same way as in the DC motor, which is in comparison to a threshold value and with the generation of a difference signal. The particular determination of stator current contributions producing the orthogonal magnetic field may be derived using information from precision sensors. For example, encoders 16x, 16y may provide accurate information regarding the angle of the motor shaft relative to a reference point.
A fourth step of the control procedure creates a set of correction signals from the difference signals generated in the third step. The correction signals are applied to the PWM drive circuits and thus the motor windings in a fifth step.
Turning back to FIG. 1, an embodiment is described wherein motor 12x and motor 12y are three-phase, two-pole, alternating current induction motors (ACIM) configured as left and right motors in a conventional motor driven EPS drive system 10. In the embodiment, when the automobile steering wheel is rotated, a signal corresponding to the steering column rotation is produced and passed into control circuits 18x, 18y. The steering column input signal (not shown) is processed by the control circuits 18x, 18y to produce input signals to PWM drive circuits 14x, 14y. The encoders 16x, 16y produce analog output representations of the respective motor shaft position in accordance with each of the three windings of the motor. The analog output representations are passed into the respective ADC module 22x, 22y, and digital values corresponding to the analog output representations are produced. The digital values are passed to the control circuits 18x, 18y, combined with additional steering column input signals, and used to produce updated input signals to the PWM drive circuits 14x, 14y. 
Summarizing the illustration of FIG. 1, each motor 12x, 12y is controlled according to a feedback driven closed loop system. A particular set of measurement and calculation steps are repeated over and over according to a pattern set by the scheduler 20. The pattern may be repeated thousands of times per second.
If the conventional motor driven EPS drive system 10 of FIG. 1 should fail, the lives of people and the value of property are put at risk. For example, if one or both motors 12x, 12y provide too little or too much torque assistance, a driver of the associated vehicle may not be able to steer effectively, and the vehicle may be involved in a collision. The collision may injure or kill people, and the collision will nearly always damage the vehicle and will likely damage other property too. The improper application of torque may be created by a failure of a motor, a sensor, or some other part of the system.
The conventional motor driven EPS drive system 10 does not illustrate any error detection, error correction, or other safety apparatus. Certain safety systems have been contemplated, however. For example, in one case, a copy of the electronic controls of the conventional EPS drive system 10 is created. That is, in the vehicle, alongside the EPS drive system 10, a second scheduler, second X and Y controllers, and second X and Y sensors are configured. As the vehicle is operated, both the actual EPS drive system 10 and the duplicate control system are operated. It is expected that both the actual system and the duplicate system will operate in unison. A separate detection mechanism monitors the operations of both systems so as to detect a lack of synchronous operation. If the two systems are out of sync, then an error is flagged.
Another safety system is described in U.S. Pat. No. 6,456,946 to O'Gorman entitled System and Method for Motor Fault Detection. The O'Gorman patent describes a system illustrated in his FIG. 3, which detects motor faults using a current sensor 328, filters 330, 332, and a controller 220. The current sensor is electrically connected to the filters (i.e., a band pass filter or a low pass filter), and the controller tunes the filters to a rotational frequency of a motor. The controller then selects an output signal conditioned by either the band pass filter or the low pass filter, compares the selected signal to a predetermined value, and detects a fault based on the comparison. The O'Gorman system relies on a precision resistor 328 (shown in his FIG. 4) or a Hall effect current sensor described in the specification to accurately detect current flowing in motor windings. A disruption in balanced current, which is contrasted in O'Gorman's FIGS. 8 and 9 to his FIGS. 10 and 11, indicates the presence of a short circuit fault in the motor.